package br.com.andreikeda.utility.gestor.finance.storage.database.model;

/**
 * Created by LimaoGames on 22/01/2015.
 * contact me: andreikeda87@gmail.com
 */
public class Category {

    private long id;
    private String name;
    private int resId;

    public Category(long id, String name, int resId) {
        this.id = id;
        this.name = name;
        this.resId = resId;
    }

    public long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getResId() {
        return resId;
    }

    public boolean hasResource() {
        return resId != 0;
    }

    public boolean isNameValid(String name) {
        return name.length() < 32;
    }

    public void setName(String newName) {
        name = newName;
    }

    public void setResId(int newResource) {
        resId = newResource;
    }
}
